package com.example.dllo.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.example.dllo.fragment.Rich_Fragment;

/**
 * Created by dllo on 2015/12/2.
 */
public class Rich_Adapter extends FragmentPagerAdapter{
    private  String[] titles  ={"窍门","欣赏","新闻"};
    public Rich_Adapter(FragmentManager fm) {

        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        return Rich_Fragment.newInstance(position);
    }

    @Override
    public int getCount() {
        return titles.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return titles[position];
    }
}

